Complex Autosizing Example

This example interface shows how to use autosizing so that a window can shrink to a small size and have its components remain usable.

Before Resizing After Resizing

Here are the autosizing attributes used in the example:

Autosizing Display Object
Window: Its minimum size is set just large enough for the main view to show its content and for the slider and the button to be usable.
Slider: Its box keeps the same distance from the window's adjacent edges, but resizes the gaps between itself and other views. It resizes itself horizontally but not vertically.
Button: It complements the slider box's attributes. It keeps the same distance from the window's adjacent edges, but resizes all other distances. It also resizes itself horizontally but not vertically.
Custom view: It maintains a constant distance from all edges, but it's resizeable in all directions.

Related Topics

© 1999 Apple Computer, Inc.